package com.example.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.List;

/**
 * 管理员签到请求DTO
 * 用于管理员代替用户签到或批量签到
 */
@Data
@Schema(description = "管理员签到请求数据传输对象")
public class AdminCheckInRequestDTO {

    @Schema(description = "讲座ID", example = "2001")
    @NotNull(message = "讲座ID不能为空")
    private Long lectureId;

    @Schema(description = "操作管理员ID", example = "3001")
    @NotNull(message = "操作管理员ID不能为空")
    private Long operatorId;

    @Schema(description = "目标用户ID（单个签到时使用）", example = "1001")
    private Long userId;

    @Schema(description = "目标用户ID列表（批量签到时使用）", example = "[1001, 1002, 1003]")
    @Size(max = 100, message = "批量签到用户数量不能超过100个")
    private List<Long> userIds;

    @Schema(description = "操作类型", example = "SINGLE")
    @NotNull(message = "操作类型不能为空")
    private OperationType operationType;

    @Schema(description = "操作原因（可选）", example = "用户到场但无法自主签到")
    @Size(max = 500, message = "操作原因不能超过500个字符")
    private String reason;

    /**
     * 操作类型枚举
     */
    public enum OperationType {
        @Schema(description = "单个签到")
        SINGLE,
        
        @Schema(description = "批量签到")
        BATCH
    }
}